package com.gtw.modules.sys.service.impl;

import com.gtw.modules.dao.TbIntegralDao;
import com.gtw.modules.entity.TbIntegral;
import com.gtw.modules.sys.service.TbIntegralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/** 积分数据接口实现类
 * Created by wuye on 2018/2/28.
 */
@Service
public class TbIntegralServiceImpl implements TbIntegralService {

    @Autowired
    private TbIntegralDao tbIntegralDao;

    @Override
    public TbIntegral queryObject(Integer id) {
        return tbIntegralDao.queryObject(id);
    }

    @Override
    public List<TbIntegral> queryList(Map<String, Object> map) {
        return tbIntegralDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return tbIntegralDao.queryTotal(map);
    }

    @Override
    public void save(TbIntegral integral) {
        tbIntegralDao.insert(integral);
    }

    @Override
    public void update(TbIntegral integral) {
        tbIntegralDao.updateByPrimaryKey(integral);
    }

    @Override
    public void delete(Integer id) {
        tbIntegralDao.delete(id);
    }

    @Override
    public void deleteBatch(Integer[] ids) {
        tbIntegralDao.deleteBatch(ids);
    }

    @Override
    public List<TbIntegral> findAll(int type) {
        return tbIntegralDao.findAll(type);
    }
}
